import request from '@/utils/request'

// 获得司机数据列表
export function listDriver(query) {
  return request({
    url: '/motor/driver/getAll',
    method: 'get',
    params: query
  })
}
//获得数据总条数
export function getTotal(query) {
  return request({
    url: '/motor/driver/getTotal',
    method: 'get',
    params: query
  })
}
// 删除司机数据
export function delDriver(driverId) {
  return request({
    url: '/motor/driver/' + driverId,
    method: 'delete'
  })
}
//获得冷库名称信息

//Driver
// 添加司机数据
export function addDriver(data) {
  return request({
    url: '/motor/driver/addDriver',
    method: 'post',
    data: data
  })
}
//通过id查询司机
export function getDriverById(driverId) {
  return request({
    url: '/motor/driver/' + driverId,
    method: 'get'
  })
}
//修改司机数据
export function updateDriver(data) {
  return request({
    url: '/motor/driver/updateDriver',
    method: 'post',
    data: data
  })
}


// 获得冷库信息

export function listCold(query) {
  return request({
    url: '/motor/driver/getListCold',
    method: 'get',
    params: query
  })
}
// 获得冷库信息总条数
export function getCount(query) {
  return request({
    url: '/motor/driver/getColdCount',
    method: 'get',
    params: query
  })
}

